package A一周刷爆LeetCode.A基础班.B认识复杂度和简单排序算法;

/**
 * @author wei.zhao
 * @description: 测试
 * @date 2022年01月10日 14:51
 */
public class Test {

    public static void main(String[] args) {
        System.out.println("------------选择排序-----------------");
        new Code01_SelectionSort().test();
        System.out.println("------------冒泡排序-------------");
        new Code02_BubbleSort().test();
        System.out.println("-------------插入排序------------");
        new Code03_InsertionSort().test();
        System.out.println("------------有序数组中，某个数是否存在-----------");
        boolean exist = Code04_BSExist.exist(new int[]{1, 2, 4, 7, 8, 9, 12, 14, 17, 18, 19, 21, 23, 24, 26, 30, 31}, 14);
        System.out.println(exist);
        System.out.println("------------有序数组中，大于等于某个数最左侧的位置-----------");
        int nearestIndex = Code05_BSNearLeft.nearestIndex(new int[]{1, 2, 4, 7, 8, 9, 12, 14, 17, 18, 19, 21, 23, 24, 26, 30, 31}, 10);
        System.out.println(nearestIndex);
        System.out.println("------------无序数组中，找出一个局部最小值-----------");
        int localMinimum = Code06_BSLocalMinimum.localMinimum(new int[]{21, 19, 18, 17, 14, 16, 23, 27, 25, 22, 24, 30, 31});
        System.out.println(localMinimum);
        System.out.println("-----------递归求数组中的最大值------------");
        int max = Code07_GetMax.getMax(new int[]{1, 2, 7, 4, 6, 9, 14, 8, 20, 29, 18, 17, 14});
        System.out.println(max);
    }

}
